#include "LanguageWindow.h"
#include "mainwindow.h"
#include "ui_LanguageWindow.h"
#include <QButtonGroup>

LanguageWindow::LanguageWindow(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LanguageWindow)
{
    ui->setupUi(this);
    QButtonGroup *group = new QButtonGroup;
    group->addButton(ui->radioButton_En);
    group->addButton(ui->radioButton_Rus);
    ui->radioButton_En->group();
    Lang = 0;
}

LanguageWindow::~LanguageWindow()
{
    delete ui;
}

void LanguageWindow::on_pushButton_clicked()
{
    if (ui->radioButton_En->isChecked())
        setLang(true);
    else setLang(false);
    this->hide();
}

void LanguageWindow::on_pushButton_2_clicked()
{
    this->hide();
}

void LanguageWindow::setLang(bool t_Lang)
{
    Lang = t_Lang;
}
